const express = require('express');
const router = express.Router();
const { D_ICPMS } = require('../../models');


router.get('/', async function (req, res) {
    try {
        const dicpms = await D_ICPMS.findAll({
            attributes: ['Sample_ID', 'Sample_Name', "D_206Pb_238U_age", "D_206Pb_238U_age_1SE"],
            limit: 400
        });
        res.json(
            {
                status: true,
                message: '查询成功！',
                data: {
                    dicpms
                }
            }
        )
    }
    catch (error) {
        res.json(
            {
                status: false,
                message: "数据获取失败！",
                errors: [error.message]
            }
        )
    }
})

module.exports = router;